<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery/jquery-3.6.0.js"></script>
</head>
<body>
    <p>This is paregraph</p>
    <button onclick="appendtext()">追加文本</button>
    <script>
        function appendtext(){
            var txt1 = '<br><strong>text.</strong><br>';
            var txt2 = $("<i></i><br>").text("text");
            var txt3 = document.createElement('p');
            txt3.innerHTML = "text";
            $("body").append(txt1,txt2,txt3);
        }
    </script>
</body>
</html>